package com.global.gbinventory.barang.util;

import java.awt.Component;

import javax.swing.JOptionPane;

public class Status {
	
	STATUS_TYPE type;
	
	public Status(STATUS_TYPE type){
		this.type = type;
	}
	
	public void showMessage(Component parent){
		String title = "";
		String message = "";
		switch (type) {
		case SUCCESS:
			title = "Sukses";
			message = "Berhasil disimpan !!!";
			JOptionPane.showMessageDialog(parent, message, title, JOptionPane.INFORMATION_MESSAGE);
			break;
			
		case ERROR_EMPTY_TUPLE:
			title = "Gagal";
			message = "Kolom tidak boleh kosong !!!";
			JOptionPane.showMessageDialog(parent, message, title, JOptionPane.INFORMATION_MESSAGE);
			break;
		default:
			break;
		}
		
		
	}

}
